QT += widgets gui

CONFIG += c++11 console
CONFIG -= app_bundle
DESTDIR = $$PWD/dist

# ffmpeg
FFMPEGLIB_DIR=D:/Projects/OpenSource/ffmpeg-build/ffmpeg-N-105193-g2b541b8c1d-20220106-win64-shared
include($$FFMPEGLIB_DIR/ffmpeg-lib.pri)

ffmpeglib.path = $$DESTDIR
ffmpeglib.files = $$FFMPEGLIB_DIR/bin/avcodec-59.dll $$FFMPEGLIB_DIR/bin/avformat-59.dll \
    $$FFMPEGLIB_DIR/bin/swscale-6.dll $$FFMPEGLIB_DIR/bin/avfilter-8.dll $$FFMPEGLIB_DIR/bin/avutil-57.dll \
    $$FFMPEGLIB_DIR/bin/swresample-4.dll
INSTALLS += ffmpeglib

# SDL
SDLLIB_DIR=D:/Projects/OpenSource/SDL/SDL2-devel-2.0.18-VC
include($$SDLLIB_DIR/SDL_2018VC.pri)

sdllib.path = $$DESTDIR
sdllib.files = $$SDLLIB_DIR/lib/x64/SDL2.dll
INSTALLS += sdllib

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
        Utils/Utils.cpp \
        VideoPlayer/AudioPlayer.cpp \
        VideoPlayer/VideoPlayer.cpp \
        VideoPlayer/VideoPlayerPrivate.cpp \
        VideoSource/AVDecodeContext.cpp \
        VideoSource/AudioDecoder.cpp \
        VideoSource/VideoDecoder.cpp \
        VideoSource/VideoSource.cpp \
        main.cpp

HEADERS += \
    Utils/Utils.h \
    VideoPlayer/AudioPlayer.h \
    VideoPlayer/VideoPlayer.h \
    VideoPlayer/VideoPlayerDefine.h \
    VideoPlayer/VideoPlayerPrivate.h \
    VideoSource/AVDecodeContext.h \
    VideoSource/VideoDecoder.h \
    VideoSource/AudioDecoder.h \
    VideoSource/VideoSource.h

INCLUDEPATH += $$PWD/VideoPlayer

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

